﻿@{
    Layout = null;
}
@*@model System.Data.DataTable*@
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
<head>
    <title>特殊调整查询</title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.DropDownEdit, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.ComboBox, Theme = DevExpressHelper.Theme }
)
   <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/checkinput.js")" type="text/javascript"></script>
    <style type="text/css">
        #form_query
        {
        }
        
        input, select
        {
            border: 1px solid #aecaf0;
        }
        input.txt, select.txt
        {
            width: 99%;
        }
        input.btn
        {
            padding: 3px 10px 2px;
            border: #a3c0e8 1px solid;
            background: #e2f0ff url(/EnterpriseFund/DXR.axd?r=0_54) repeat-x 50% top;
            color: #2c4d79;
            cursor: pointer;
        }
        input.btn:hover
        {
            background-image: url(/EnterpriseFund/DXR.axd?r=0_57);
        }
        th
        {
            text-align: right;
        }
    </style>
    <script type="text/javascript">
        var rootUrl = '@Url.Content("~/QuerySpecificAdjust/")';
        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;


            var fSpecialAdjustName = FSpecialAdjustName.GetValue();
            var nsrsbh = $("#hnsrsbh").val();
            var nsrbm = $("#hnsrbm").val();
            var nsrmc = $("#hnsrmc").val();
            var rKRQBeginDate = $("#hrKRQBeginDate").val();
            var rKRQEndDate = $("#hrKRQEndDate").val();
            var sSRQBeginDate = $("#hsSRQBeginDate").val();
            var sSRQEndDate = $("#hsSRQEndDate").val();


            e.customArgs["FSpecialAdjustName"] = fSpecialAdjustName;
            e.customArgs["nsrsbh"] = nsrsbh;
            e.customArgs["nsrbm"] = nsrbm;
            e.customArgs["nsrmc"] = nsrmc;
            e.customArgs["RKRQBeginDate"] = rKRQBeginDate;
            e.customArgs["RKRQEndDate"] = rKRQEndDate;
            e.customArgs["SSRQBeginDate"] = sSRQBeginDate;
            e.customArgs["SSRQEndDate"] = sSRQEndDate;
        }


        //查询
        function search() {
            $("#hnsrsbh").val(Nsrsbh.GetText());
            $("#hnsrbm").val(Nsrbm.GetText());
            $("#hnsrmc").val(Nsrmc.GetText());
            if (RKRQBeginDate.GetDate() != null) {
                $("#hrKRQBeginDate").val(RKRQBeginDate.GetText());
            }
            else {
                $("#hrKRQBeginDate").val("");
            }
            if (RKRQEndDate.GetDate() != null) {
                $("#hrKRQEndDate").val(RKRQEndDate.GetText());
            }
            else {
                $("#hrKRQEndDate").val("");
            }
     
                $("#hsSRQBeginDate").val(SSRQBeginDate.GetText());

            
                $("#hsSRQEndDate").val(SSRQEndDate.GetText());
            
            //              var fspecialAdjustName = FSpecialAdjustName.GetValue();
            //               var rKRQBeginDate = RKRQBeginDate.GetValue();
                //                var rKRQEndDate = RKRQEndDate.GetValue();
                $("#hsearched").val("T");
            gvEditing.Refresh();

        }


        //重置
        function undo() {
            FSpecialAdjustName.SetText("");
            $("#nsrsbh").val("");
            $("#nsrbm").val("");
            $("#nsrmc").val("");
            RKRQBeginDate.SetText("");
            RKRQEndDate.SetText("");
            $("#SSRQBeginDate").val("");
            $("#sSRQEndDate").val("");
         
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        if ($("#hsearched").val() == "T") {

                            //if (CheckValues())
                            form_query.target = '_self';
                            form_query.action = rootPath + "/QuerySpecificAdjust/ExportToXls";
                            form_query.submit();
                        }
                        break;


                    }
                case "btnReport":
                    {
                        if ($("#hsearched").val() == "T") {

                            window.showModalDialog(rootPath + "/QuerySpecificAdjust/Print", window, "dialogWidth=800px;dialogHeight=500px");
                        }
                        //if (CheckValues())
                        //                        form_query.target = '_blank';
                        //                        //  form_query.target = 'parent.contentframe';
                        //                        //  parent.contentframe.url(
                        //                        form_query.action = rootPath + "/QuerySpecificAdjust/Print";
                        //                        form_query.submit();
                        break;


                    }

                case "btnGridShow":
                    {
                        gvEditing.ShowCustomizationWindow();
                        break;
                    }
            }
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
    </script>
</head>
<body  onkeypress="keyPress()">
    @Html.Partial("LoadPanelPartial")
    @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnExcel";
        item.Text = "导出Excel";
        item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnReport";
        item.Text = "打印";
        item.Image.Url = Url.Content("~/Content/icons/print.png");
    });


    settings.Items.Add(item =>
    {
        item.Name = "btnGridShow";
        item.Text = "选择列";
        item.Image.Url = Url.Content("~/Content/FunctionImages/AllowanceFileAudit.png");
    });
	
    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    @using (Html.BeginForm("ExportToXls", "QuerySpecificAdjust", FormMethod.Post, new { id = "form_query" }))
    {

@* <form name="form_query" id="form_query" method="post" class="form_query" action="@Url.Content("~/QuerySpecificAdjust/index")">*@
        <table class="query" width="810px" style="margin-left: auto; margin-right: auto">
            <tr>
                <td align="right" style="text-align:right">
                    纳税人识别号：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrsbh";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               }).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    纳税人编码：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrbm";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               }).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    调整日期：
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                @Html.DevExpress().DateEdit(settings =>
           {
               settings.Name = "RKRQBeginDate";
               settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               settings.Properties.ShowShadow = true;
               settings.Properties.EditFormat = EditFormat.Date;
               settings.Properties.EditFormatString = "yyyy-MM-dd";
               settings.Properties.MinDate = DateTime.Parse("1900-01-01");
               settings.Properties.UseMaskBehavior = true;
           }).Bind(ViewBag.RKRQBeginDate).GetHtml()
                            </td>
                            <td>
                                -
                            </td>
                            <td>
                                @Html.DevExpress().DateEdit(settings =>
                          {
                              settings.Name = "RKRQEndDate";
                              settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                              settings.Properties.ShowShadow = true;
                              settings.Properties.EditFormat = EditFormat.Date;
                              settings.Properties.EditFormatString = "yyyy-MM-dd";
                              settings.Properties.MinDate = DateTime.Parse("1900-01-01");
                              settings.Properties.UseMaskBehavior = true;
                          }).Bind(ViewBag.RKRQEndDate).GetHtml()
                            </td>
                        </tr>
                    </table>
                </td>
               <td colspan="2">
                    <table>  
                        <tr>     
                               <td>
                    @Html.DevExpress().Button(settings =>
      {
          settings.Name = "btnSearch";
          settings.Text = "查询";
          settings.ControlStyle.CssClass = "button";
          settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
          settings.ClientSideEvents.Click = "search";
      }).GetHtml()
                </td>
                <td>
                    @Html.DevExpress().Button(settings =>
        {
            settings.Name = "btnUndo";
            settings.Text = "重置";
            settings.ControlStyle.CssClass = "button";
            settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
            settings.ClientSideEvents.Click = "undo";
        }).GetHtml()
                </td>
                </tr>
                    </table></td>
            </tr>
            <tr>
                <td align="right" style="text-align:right">
                    纳税人名称：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrmc";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               }).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    调整类型：
                </td>
                <td>
                    @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FSpecialAdjustName";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                   settings.Properties.TextField = "FSpecialAdjustName";
                   settings.Properties.ValueField = "FSpecialAdjustClsNo";
               }).BindList(ViewBag.FSpecialAdjustNames).Bind(ViewBag.FSpecialAdjustName).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    调整金额：
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "SSRQBeginDate";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               }).GetHtml()
                            </td>
                            <td align="center">
                                -
                            </td>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "SSRQEndDate";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               }).GetHtml()
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="5">
                    <table>
                        <tr>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        @Html.Partial("QuerySpecificAdjustListPartial", Model)
    @Html.Hidden("hfSpecialAdjustName","");
    @Html.Hidden("hnsrsbh","");
    @Html.Hidden("hnsrbm","");
    @Html.Hidden("hnsrmc","");
    @Html.Hidden("hrKRQBeginDate","");
   @Html.Hidden("hrKRQEndDate","");
    @Html.Hidden("hsSRQBeginDate","");
    @Html.Hidden("hsSRQEndDate","");
                                   @Html.Hidden("hsearched", "F")
    }
</body>
</html>
<script>
    lp.Hide();
</script>
